package com.greenold.task.service.impl;

import com.greenold.service.domain.vo.CheckInConfigVO;
import com.greenold.task.mapper.GenerateNurseTaskMapper;
import com.greenold.task.service.IGenerateNurseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author YueYang
 * Created on 2025/10/27 21:08
 * @version 1.0
 */
@Service
public class GenerateNurseServiceImpl implements IGenerateNurseService {

    @Autowired
    private GenerateNurseTaskMapper generateNurseTaskMapper;

    /**
     * 生成护理任务
     */
    @Override
    public void generateNurseTask() {
        // 查询入住配置表获取所有老人的入住配置信息
        List<CheckInConfigVO> checkInConfigVOList = generateNurseTaskMapper.selectAll();

        //遍历入住配置信息获取老人id集合
        List<Long> elderIdList = checkInConfigVOList.stream()
                .map(CheckInConfigVO::getElderId)
                .collect(Collectors.toList());




    }
}
